From: Keir Fraser Date: Fri, 18 Jun 2010 13:09:29 +0000 (+0100) Subject: xl: tidy up around global '-v' option X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11905 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=d3e1e67d8ad428d79e0f0bba5b52f390ad70ec6c;p=xen.git xl: tidy up around global '-v' option Signed-off-by: Tim Deegan --- diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index d00dcefe1d..496eb54c33 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -74,7 +74,7 @@ int main(int argc, char **argv) if (cspec) return cspec->cmd_impl(argc, argv); else if (!strcmp(cmd, "help")) { - help(argv[2]); + help(argv[optind]); exit(0); } else { fprintf(stderr, "command not implemented\n"); diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index b0e1341aeb..b506d816db 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1285,7 +1285,7 @@ void help(char *command) struct cmd_spec *cmd; if (!command || !strcmp(command, "help")) { - printf("Usage xl [args]\n\n"); + printf("Usage xl [-v] [args]\n\n"); printf("xl full list of subcommands:\n\n"); for (i = 0; i < cmdtable_len; i++) printf(" %-20s%s\n", @@ -1293,7 +1293,7 @@ void help(char *command) } else { cmd = cmdtable_lookup(command); if (cmd) { - printf("Usage: xl %s %s\n\n%s.\n\n", + printf("Usage: xl [-v] %s %s\n\n%s.\n\n", cmd->cmd_name, cmd->cmd_usage, cmd->cmd_desc);